Field of the Invention
The present invention relates to an image processing technique to perform halftone processing on an input image by using a threshold value matrix.
Description of the Related Art
Conventionally, there has been such a problem that, in the case where a thin line whose color is bright is output by using a printing apparatus, the thin line is output in a broken state. In the case of an ink jet printer, by separating colors of an input image and performing halftone processing, a dot image indicating whether or not a dot of a color material (ink) is printed is generated. Ink is ejected from print nozzles based on the dot image and thus an image is formed. Such a printer uses area coverage modulation that represents gradation in a pseudo manner by the number of dots of ink printed in a unit area on a sheet instead of representing gradation by one dot. Then, the number of dots to be printed is determined by the halftone processing and in the case where one color ink is considered, generally, a small number of dots will result in a bright sheet (density is low) and a large number of dots will result in a dark sheet (density is high).
In the case of the dot image that represents an image by using the above-described pseudo gradation, a thin line whose color is bright is represented by a tone level with a small number of dots as a result. Because of this, the number of blanks between dots increases, and therefore, there is such a problem that the line seems to be broken to the human eye.
The general method of halftone processing is roughly divided into the error diffusion method and the dither method, and the dither method is more likely to bring about a problem of such breaks of a line. FIG. 1 shows an example in which a thin line is subjected to processing using the error diffusion method (ED) and the dither method, respectively. In FIG. 1, a thin line 10 is a thin line obtained by applying the error diffusion method and a thin line 11 is a thin line obtained by applying the dither method by using a threshold value matrix caused to have blue noise characteristics. Both the thin line 10 and the thin line 11 are obtained by performing the processing on the same input image and the number of dots in the output results is also substantially the same. However, breaks of the thin line 10 in which the dots and blanks are located substantially at uniform intervals are unlikely to be recognized, but breaks of the thin line in which dots and blanks are partially located densely and partially located sparsely are likely to be recognized. The reason is that blanks 12 appear here and there in the thin line, and therefore, there exist many areas in which dots are located sparsely.
To deal with the problem such as described above, for example, there is a technique that detects the position of a thin line within input image data and in the case where no dot is formed in the position of the thin line by the normal screen processing, changes the threshold value of the position of the thin line into a threshold value that causes a dot to be formed, and then performs the screen processing again. This technique prevents breaks of a thin line by changing the threshold value of the thin line position where no dot is formed into a threshold value that causes a dot to be formed so as to increase the number of positions where a dot is formed (Japanese Patent Laid-Open No. 2012-157998).
However, in the processing to detect the thin line that is performed in Japanese Patent Laid-Open No. 2012-157998, the analysis is performed by using pixel values of the image, and therefore, there is such a problem that the load to the system is high and that the processing takes time.